//
//  PlayManager.h
//  MusicDemo
//
//  Created by 大展 on 16/6/16.
//  Copyright © 2016年 Mario. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol PlayManagerDelegate <NSObject>

// 把播放的时间和进度信息传递过去
- (void)playManagerDelegateFetchTotalTime:(NSString *)totalTime currentTime:(NSString *)currentTime progress:(CGFloat)progress;

// 自动播放到下一首的
- (void)playToNextMusic;

@end

@interface PlayManager : NSObject

@property (nonatomic, weak)id<PlayManagerDelegate> delegate;

+ (instancetype)sharedManager;

// 准备去播放
- (void)prepareToPlayMusicWithUrl:(NSString *)url;

// 播放
- (void)playMusic;

// 暂停
- (void)pauseMusic;

// 快进快退
- (void)playMusicWithSliderValue:(CGFloat)progress;

- (BOOL)isPlaying;

@end
